package com.twu.biblioteca;

import javafx.scene.input.MouseButton;

/**
 * Created with IntelliJ IDEA.
 * User: rwalters
 * Date: 01/02/13
 * Time: 16:03
 * To change this template use File | Settings | File Templates.
 */
public class MovieMenu extends Menu {
    public String header;

    public MovieMenu(InOut _inOut) {
        inOut = _inOut;
    }

    public void display() {
        inOut.println(title);
        for (MenuItem item : itemList) {
            inOut.println(item.text);
            if (this.itemList.indexOf(item) == 0) {
                inOut.println(header);
            }
        }
    }

    public boolean selectItem(int inputValue) {
        if (inputValue == 0) {
            itemList.get(inputValue).select.Invoke();
            return true;
        }
        else {
            inOut.println("Select a valid option!!");
            return false;
        }
    }
}
